package Si.Assign1.Model;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name="ProductTypeAttributes")
@NamedQueries(
     {
    @NamedQuery(name="listProductTypeAttributes",
                query="SELECT pta FROM ProductTypeAttributes pta"),
    @NamedQuery(name="getProductTypeAttributesById",
                query="SELECT pta FROM ProductTypeAttributes pta WHERE pta.id = :id"),
    @NamedQuery(name="getProductTypesByName",
                query="SELECT pta FROM ProductTypeAttributes pta WHERE pta.name = :name")
     }
		)
		
public class ProductTypeAttributes 
{
	public ProductTypeAttributes(){}

	/*
	 * Properties
	 */
	
	/*
	 * Set and get id
	 */
	public int getId()
	{	return id;   }
	public void setId(int id)
	{   this.id = id; }
	
	/*
	 * Set and get name
	 */
	public String getName()
	{   return name;   }
	public void setName(String name)
	{   this.name = name;  }
	
	/*
	 * Set and get is_required
	 */
	public char getIsRequired()
	{   return isRequired;  }
	public void setIsRequired(char isRequired)
	{   this.isRequired = isRequired;  }
	
	/*
	 * Set and get product_type_id
	 */
	public int getProductTypeId()
	{	return product_type_id;  }
	public void setProductTypeId(int productTypeId)
	{   this.product_type_id = productTypeId;  }
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Basic(optional=false)
	@Column(name="id", nullable=false)
	private int id;
	@Column(name="name", length=255, nullable=false)
	private String name;
	@Column(name="is_required", length=1, nullable=false)
	private char isRequired;
	@Column(name="product_type_id", nullable=true)
	private int product_type_id;
	
}
